<?php 
class Zend_View_Helper_FormatCurrency extends Zend_View_Helper_Abstract{
    private $_config;
    
    const CURRENCY_USD = 1;
    const CURRENCY_EUR = 2;
    const CURRENCY_UAH = 3;
    
    public function formatCurrency($amount, $toCurrency = null){
        if($amount == 0) return 'Дог.';
        if(null === $toCurrency){
            $toCurrency = self::CURRENCY_USD;
        }
        
        switch ($toCurrency) {
            case self::CURRENCY_USD:
                return '$'.$amount;
            break;
            
            case self::CURRENCY_EUR:
                return '&euro;'.$amount;
            break;
            case self::CURRENCY_UAH:
                return $amount." грн.";
            break;
        }
    }
}